home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 August / Australian PC User - August 2003 (CD2).iso / software / online / files / netsnip.exe / %MAINDIR% / Templates / Bibliography / Standard / MLA.xsl
Encoding:
Extensible Markup Language  |  2003-06-02  |  4.0 KB  |  128 lines

  1. <?xml version="1.0"?>
  2.  
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
  4.  
  5.   <xsl:template match="/">
  6.            
  7.             <font size="1" face="MS Sans Serif">
  8.             <xsl:apply-templates select="MLA/Biblio"/>
  9.             <p/>
  10.             </font>
  11.  
  12.   </xsl:template>
  13.  
  14.  
  15.   <xsl:template match="Biblio">
  16.     <xsl:choose>
  17.     <xsl:when test="Type[.='Web Site']">
  18.             <xsl:apply-templates select="Authors"/>
  19.             <u><xsl:value-of select="Title"/></u>.
  20.             <xsl:apply-templates select="Compilers"/>
  21.             <xsl:apply-templates select="Editors"/>
  22.             <xsl:apply-templates select="Translators"/>
  23.             <xsl:apply-templates select="Date_Created"/>
  24.             <xsl:apply-templates select="Institution"/>
  25.             <xsl:apply-templates select="Date_Accessed"/>
  26.             <xsl:apply-templates select="URL"/>
  27.     </xsl:when> 
  28.  
  29.     <xsl:when test="Type[.='Book']">
  30.             <xsl:apply-templates select="Authors"/>
  31.             <u><xsl:value-of select="Title"/></u>.
  32.             <xsl:apply-templates select="Compilers"/>
  33.             <xsl:apply-templates select="Editors"/>
  34.             <xsl:apply-templates select="Translators"/>
  35.             <xsl:apply-templates select="Date_Accessed"/>
  36.             <xsl:apply-templates select="URL"/>
  37.     </xsl:when> 
  38.  
  39.     <xsl:when test="Type[.='eZine']">
  40.             <xsl:apply-templates select="Authors"/>
  41.             "<xsl:value-of select="Title"/>."
  42.             <xsl:apply-templates select="Compilers"/>
  43.             <xsl:apply-templates select="Editors"/>
  44.             <xsl:apply-templates select="Translators"/>
  45.             <xsl:apply-templates select="Name"/>
  46.             <xsl:apply-templates select="Date_Created"/>
  47.             <xsl:apply-templates select="Date_Accessed"/>
  48.             <xsl:apply-templates select="URL"/>
  49.     </xsl:when> 
  50.  
  51.     <xsl:when test="Type[.='eJournal']">
  52.             <xsl:apply-templates select="Authors"/>
  53.             "<xsl:value-of select="Title"/>."
  54.             <xsl:apply-templates select="Compilers"/>
  55.             <xsl:apply-templates select="Editors"/>
  56.             <xsl:apply-templates select="Translators"/>
  57.             <xsl:apply-templates select="Name"/>
  58.             <xsl:apply-templates select="Date_Created"/>
  59.             <xsl:apply-templates select="Date_Accessed"/>
  60.             <xsl:apply-templates select="URL"/>
  61.     </xsl:when> 
  62.  
  63.     <xsl:when test="Type[.='Newspaper']">
  64.             <xsl:apply-templates select="Authors"/>
  65.             "<xsl:value-of select="Title"/>."
  66.             <xsl:apply-templates select="Compilers"/>
  67.             <xsl:apply-templates select="Editors"/>
  68.             <xsl:apply-templates select="Translators"/>
  69.             <xsl:apply-templates select="Name"/>
  70.             <xsl:apply-templates select="Date_Created"/>
  71.             <xsl:apply-templates select="Date_Accessed"/>
  72.             <xsl:apply-templates select="URL"/>
  73.     </xsl:when> 
  74.  
  75.     <xsl:otherwise>
  76.          <br/>Unknown Bibliography Type: <xsl:value-of select="Type"/><br/>
  77.  
  78.     </xsl:otherwise>
  79.  
  80.     </xsl:choose>
  81.  
  82.  </xsl:template>  
  83.  
  84.   <xsl:template match="Authors">
  85.       <xsl:value-of select="."/>.
  86.  
  87.   </xsl:template>  
  88.  
  89.   <xsl:template match="Compilers">
  90.       Comp. 
  91.       <xsl:value-of select="."/>.
  92.  
  93.   </xsl:template>  
  94.  
  95.   <xsl:template match="Editors">
  96.       Ed.
  97.       <xsl:value-of select="."/>.
  98.  
  99.   </xsl:template>  
  100.  
  101.   <xsl:template match="Translators">
  102.       Trans.
  103.       <xsl:value-of select="."/>.
  104.  
  105.   </xsl:template>  
  106.  
  107.   <xsl:template match="Date_Created">
  108.       <xsl:value-of select="."/>.
  109.   </xsl:template>  
  110.  
  111.   <xsl:template match="Institution">
  112.       <xsl:value-of select="."/>.
  113.   </xsl:template>  
  114.  
  115.   <xsl:template match="Date_Accessed">
  116.       <xsl:value-of select="."/>
  117.   </xsl:template>  
  118.  
  119.   <xsl:template match="Name">
  120.       <u><xsl:value-of select="."/></u>.
  121.   </xsl:template>  
  122.  
  123.   <xsl:template match="URL">
  124.       <<A><xsl:attribute name="HREF"><xsl:value-of select="."/></xsl:attribute><xsl:value-of select="."/></A>>.
  125.  
  126.   </xsl:template>   
  127.  
  128. </xsl:stylesheet>